//@version: $Id: RNG.h 64 2010-11-25 20:46:39Z NeurobaticsTim@gmail.com $

#include "MersenneTwister.h"

//Class for object RNG; simple random number generator based off
//of the Mersenne Twister algorithm.

class RNG
{
private:
	MTRand m_mtrand;		//Mersenne Twister class variable
	int m_max;				//Maximum value

public:
	RNG():m_max(0) {}		//Constructor. Sets Max to 0

	void seed(int a_max)	//Seed: takes in argument a_max, for use in  
	{						//seeding our RNG, becoming the range
		m_max = a_max;
	}

	int generate()			//Generate: Creates a random number, with the seed
	{						//being the max. Return value is the random number
		int random = 0;
		random = m_mtrand.randInt(m_max);
		return random;
	}
};